
/*
-------------------------------------------------------------------------------------------------------------
JS Namespaces
Names:
    0).zsi
    1).zsi.Util
      1.1)zsi.Util.Common 
Description: 
    Namespaces of zsi    
Developer : Date Modified :  Reason
GMF   : 06/21/2010    :  Started the Name Spaces
----------------------------------------------------------------------------------------------
*/
//Namespace[zsi]
var zsi = new function(){};
zsi.Util = function(){};
zsi.Util.Common = new function(){};
//----------------------------------//

//zsi Property(ies)
zsi.QueuedFunctions = new Array;
//----------------------------------//

//zsi Methods
zsi.ready = function(itemfunc) {
    zsi.QueuedFunctions.push(itemfunc);
};
//----------------------------------//

$(document).ready(function() {
    __IncludeJSFiles();
});

//Functions
function inc(filename) {
    var body = document.getElementsByTagName('body').item(0);
    script = document.createElement('script');
    script.src = filename;
    script.type = 'text/javascript';
    body.appendChild(script);
}


function __IncludeJSFiles() {
    zsi.Util.Common.LoadingBar(true);  
    inc(BASE_URL + "scripts/zsi.JQueryExtendedFunctions.js");
    inc(BASE_URL + "Scripts/trhighlight.js");
    inc(BASE_URL + "Scripts/date.format.js");
    inc(BASE_URL + "Scripts/zsi.Util.calendar.js");
    setTimeout(__ExecuteFunctions, 1000);
}
function __ExecuteFunctions() {
    var q = zsi.QueuedFunctions;
    _proccess: while (true) {     
        for (var i = 0; i < q.length; i++) {
            q[i]();
            q.splice(i, 1);
                continue _proccess;             
        }     
        break _proccess;
    }
    zsi.Util.Common.LoadingBar(false);
}
//----------------------------------//

